package com.tboss.template.home.controller;

import java.security.Principal;
import java.util.Locale;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.tboss.template.home.service.ContextService;

@Controller
public class ContextController {
	
	@Autowired private ContextService contextService;

	/* Context */
	@RequestMapping(value = {"", "/", "/index"}, method = {RequestMethod.POST, RequestMethod.GET})//
	public String index(Locale locale, Model model, Principal principal, HttpServletRequest req) {
		
		String rtnUrl = "index";
		
		this.contextService.index(locale, model, principal);
		
		return rtnUrl;
	}

}
